﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LinkyPOS.Class
{
    class dateandunit
    {

        public static string sadecetarih()
        {

            string gun = DateTime.Now.Day.ToString();
            string yil = DateTime.Now.Year.ToString();
            int ay = Convert.ToInt32(DateTime.Now.Month);
            string ayy = "";
            if (ay <= 9)
            {
                ayy = "0" + ay.ToString();
            }
            else
            {
                ayy = ay.ToString();
            }

            string bugun = yil + "-" + ayy + "-" + gun;
            return bugun;


        }


        public static string sadecesaat()
        {
            string saat = DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second;

            return saat;


        }


    }
}
